#ifndef OPEN_PIECE_DIALOG_H
#define OPEN_PIECE_DIALOG_H

#include <QtGui/QDialog>
#include "ui_open_piece_dialog.h"
#include "include.h"
#include "library.h"

class Open_piece_dialog : public QDialog
{
    Q_OBJECT

public:
    Open_piece_dialog(QString *, int *, QWidget *parent = 0);
    ~Open_piece_dialog();

private slots:
    void select_library();
    void select_piece();
    void accept_();
    void cancel_();
    
private:
    Ui::Open_piece_dialogClass ui;
    QString *current_library_path, library_path;
    Library current_library;
    int *current_piece_index, piece_index;
    
    void setupConnections();
    void initialize();
    void updateAtributtes();
};

#endif // OPEN_PIECE_DIALOG_H
